using System;
using System.Collections.Generic;
using SqlSugar;

namespace CoreShop.Model
{
    /// <summary>
    ///     商品表
    /// </summary>
    public partial class Goods
    {
        /// <summary>
        ///     商品ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }

        /// <summary>
        ///     商品条码
        /// </summary>
        public string code { get; set; }

        /// <summary>
        ///     商品名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        ///     商品简介
        /// </summary>
        public string brief { get; set; }

        /// <summary>
        ///     缩略图
        /// </summary>
        public string image { get; set; }

        /// <summary>
        ///     图集
        /// </summary>
        public string images { get; set; }

        /// <summary>
        ///     视频
        /// </summary>
        public string video { get; set; }

        /// <summary>
        ///     佣金分配方式
        /// </summary>
        public int productsDistributionType { get; set; }

        /// <summary>
        ///     商品分类
        /// </summary>
        public int goodsCategoryId { get; set; }

        /// <summary>
        ///     商品类别
        /// </summary>
        public int goodsTypeId { get; set; }

        /// <summary>
        ///     sku序列
        /// </summary>
        public string goodsSkuIds { get; set; }

        /// <summary>
        ///     参数序列
        /// </summary>
        public string goodsParamsIds { get; set; }

        /// <summary>
        ///     品牌
        /// </summary>
        public int brandId { get; set; }

        /// <summary>
        ///     是否虚拟商品
        /// </summary>
        public bool isNomalVirtual { get; set; }

        /// <summary>
        ///     是否上架
        /// </summary>
        public bool isMarketable { get; set; }

        /// <summary>
        ///     商品单位
        /// </summary>
        public string unit { get; set; }

        /// <summary>
        ///     商品详情
        /// </summary>
        public string intro { get; set; }

        /// <summary>
        ///     商品规格序列号存储
        /// </summary>
        public string spesDesc { get; set; }

        /// <summary>
        ///     参数序列化
        /// </summary>
        public string parameters { get; set; }

        /// <summary>
        ///     评论次数
        /// </summary>
        public int commentsCount { get; set; }

        /// <summary>
        ///     浏览次数
        /// </summary>
        public int viewCount { get; set; }

        /// <summary>
        ///     购买次数
        /// </summary>
        public int buyCount { get; set; }

        /// <summary>
        ///     上架时间
        /// </summary>
        public DateTime? uptime { get; set; }

        /// <summary>
        ///     下架时间
        /// </summary>
        public DateTime? downtime { get; set; }

        /// <summary>
        ///     商品排序
        /// </summary>
        public int sort { get; set; }

        /// <summary>
        ///     标签id逗号分隔
        /// </summary>
        public string labelIds { get; set; }

        /// <summary>
        ///     自定义规格名称
        /// </summary>
        public string newSpec { get; set; }

        /// <summary>
        ///     开启规则
        /// </summary>
        public int openSpec { get; set; }

        /// <summary>
        ///     创建时间
        /// </summary>
        public DateTime? createTime { get; set; }

        /// <summary>
        ///     更新时间
        /// </summary>
        public DateTime? updateTime { get; set; }

        /// <summary>
        ///     是否推荐
        /// </summary>
        public bool isRecommend { get; set; }

        /// <summary>
        ///     是否热门
        /// </summary>
        public bool isHot { get; set; }

        /// <summary>
        ///     是否删除
        /// </summary>
        public bool isDel { get; set; }


        /// <summary>
        ///     初始销量
        /// </summary>
        public int initialSales { get; set; }

    }


    public class CoreCmsGoodsCategory
    {
        public System.Int64 id { get; set; }
        public System.Int64? parentId { get; set; } = 0;
        public System.String name { get; set; }

        public List<CoreCmsGoodsCategory> children { get; set; } = new List<CoreCmsGoodsCategory>();
    }

}